package povos;

import java.math.BigDecimal;

import com.gg.entity.Cart;
import com.gg.entity.Fruit;

public class CartFruitPovo {
	private Cart cart;
	private Fruit fruit;
	public BigDecimal getsubtotal() {
		BigDecimal price=fruit.getFprice();
		BigDecimal count=new BigDecimal(cart.getCcount().toString());
		return price.multiply(count);
		}
	public CartFruitPovo(Cart cart, Fruit fruit) {
		super();
		this.cart = cart;
		this.fruit = fruit;
	}
	public CartFruitPovo() {
		super();
		// TODO Auto-generated constructor stub
	}
	@Override
	public String toString() {
		return "CartFruitPovo [getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()="
				+ super.toString() + "]";
	}
	public Cart getCart() {
		return cart;
	}
	public void setCart(Cart cart) {
		this.cart = cart;
	}
	public Fruit getFruit() {
		return fruit;
	}
	public void setFruit(Fruit fruit) {
		this.fruit = fruit;
	}
	
}
